home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / memmap.zip / FIG.3 < prev    next >
Text File  |  1989-05-17  |  2KB  |  40 lines

  1. Figure 3.  Structure of DOS Memory Control Block (MCB)
  2.  
  3.  
  4.    <-------------------------- 16-byte paragraph -------------------------->
  5.  
  6.     offset
  7.     0    1        3        5            8
  8.    +----+--------+--------+------------+-----------------------------------+
  9.    | Tag| Owner  | Size   |            |  DOS 4.0:  Program Name           |
  10.    +----+--------+--------+------------+-----------------------------------+
  11.  
  12.  
  13. Notes:  1.  "Tag" is hex 4D (M) for all MCBs, except the last, which is
  14.             hex 5A (Z).  Consecutive null MCBs, with tag hex 00 and size 0,
  15.             have been observed with IBM's INDCIPL.EXE/INDXMAA.SYS programs.
  16.             In some rare cases the final block may not be properly tagged.
  17.  
  18.         2.  "Owner" is a segment address pointer.  The owner of this
  19.             block starts at address owner:0.  A free block has an
  20.             owner of hex 0000.
  21.  
  22.             The owner memory block follows the MCB only for a program.
  23.  
  24.         3.  The "Size" of the block following the MCB is given in
  25.             paragraphs.  "Size" does not include the paragraph needed
  26.             for the MCB itself.
  27.  
  28.         4.  In DOS 4.0 when the MCB represents a program block, the 1-8
  29.             character "Program Name" is in the last 8 bytes of the MCB.  If
  30.             the program name is less than 8 characters long, the name is
  31.             followed by a hex 00 character.  When the MCB represents
  32.             other block types (e.g., an environment), the "Program
  33.             Name" is not present.  However, the MCB of the owner
  34.             program has the name.
  35.  
  36.             For DOS 3.X the "Program Name" must be found after the
  37.             environment variables in the corresponding environment block.
  38.  
  39.             The "Program Name" is unknown for DOS 2.X or earlier.
  40.